	//dubbo-provider-config.xml service配置添加
	<#list tableList as table> 
    	<dubbo:service interface="com.ydcloud.${table["packageName"]}.service.${table["jName"]}Service" ref="${table["jPname"]}Service" timeout="30000"/>
    </#list>
    //dubbo-consumer-config.xml geieway配置添加
    <#list tableList as table> 
    	<dubbo:reference id="${table["jName"]}Service" interface="com.ydcloud.${table["packageName"]}.service.${table["jName"]}Service"  retries="0" timeout="1000000" check="false" />
    </#list>
   
 	//MailTemplateType 邮件模板枚举
	<#list tableList as table> 
	 <#if (table["bpmnIsGenerate"])>
	 	/**
		 * ${table["jComment"]}流程发起
		 */
		${table["sName"]}_PROCESS_INITIATED(1,"${table["jComment"]}流程发起"),
		
		/**
		 * ${table["jComment"]}流程已驳回
		 */
		${table["sName"]}_PROCESS_REJECT(2,"${table["jComment"]}流程已驳回"),
		
		/**
		 * ${table["jComment"]}流程已通过审批
		 */
		${table["sName"]}_PROCESS_APPROVED(3,"${table["jComment"]}流程已通过审批"),
	</#if>
    </#list>
     // 流程枚举
	<#list tableList as table> 
	 <#if (table["bpmnIsGenerate"])>	
		 /** ${table["jComment"]}审批流程*/
    	${table["sName"]}_APPROVAL_PROCESS("${table["sPname"]}_approval_process"),
    </#if>
    </#list>
    //工作流节点配置信息表自定义用户枚举
    <#list tableList as table> 
	 <#if (table["bpmnIsGenerate"])>	
		 /** ${table["jComment"]}审批流程*/
    	${table["sName"]}_APPROVAL_PROCESS(1,"${table["jComment"]}"),
    </#if>
    </#list>
    //邮件模板
	<#list tableList as table> 
	 <#if (table["bpmnIsGenerate"])>
	 INSERT INTO `mail_template` (`PROJECT_ID`, `TYPE`, `SUBJECT`, `CONTENT`, `MODIFIER`, `MODIFY_TIME`, `STATUS`)
		 VALUES ('53', '对应枚举类型', '【${r"${"}projectName}】${table["jComment"]}审批流程发起', '【${r"${"}projectName}】${table["jComment"]}审批流程发起，请及时办理。', '', sysdate(), '1');
	 INSERT INTO `mail_template` (`PROJECT_ID`, `TYPE`, `SUBJECT`, `CONTENT`, `MODIFIER`, `MODIFY_TIME`, `STATUS`)
	     VALUES ('53', '对应枚举类型', '【${r"${"}projectName}】${table["jComment"]}审批流程已驳回', '【${r"${"}projectName}】${table["jComment"]}审批流程已驳回，请及时办理。', '', sysdate(), '1');
	 INSERT INTO `mail_template` (`PROJECT_ID`, `TYPE`, `SUBJECT`, `CONTENT`, `MODIFIER`, `MODIFY_TIME`, `STATUS`)
	  	 VALUES ('53', '对应枚举类型', '【${r"${"}projectName}】${table["jComment"]}审批流程通过审批', '【${r"${"}projectName}】${table["jComment"]}审批流程通过审批，请及时办理。', '', sysdate(), '1');
    </#if>
    </#list>
    //流程定义sql
	<#list tableList as table> 
	 <#if (table["bpmnIsGenerate"])>
	   -- ${table["jComment"]}
		INSERT INTO `act_config_prodef_object` (company_id, procdef_id, object_name,object_id, is_used, create_time,creator, update_time, modifier) 
		VALUES 
		('2', (SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1), 'park_project', '53', '1', sysdate(), '', sysdate(), '');
	 </#if>
    </#list>
	//流程节点数据库 
	<#list tableList as table> 
	 <#if (table["bpmnIsGenerate"])>
	    -- ${table["jComment"]}
		INSERT INTO `act_config_actinst` (`company_id`, `prodef_object_id`, `act_id`, `act_name`, `act_type`, `create_time`, `creator`, `update_time`, `modifier`, `assignee`, `candidate_users`, `candidate_groups`, `defined_user`, `form_key`, `documentation`, `gateway_id`, `order_no`, `classId`, `className`, `next_execute_method`, `complete_execute_method`) 
			VALUES ('2', (SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1)), '${table["sPname"]}_approval', '招商部', 'userTask', sysdate(), null, sysdate(), null, '${r"${"}applicant}', null, null, 'assignee', '${table["jPname"]}ApprovalCheck', '{\"businessType\":\"${table["jPname"]}ApprovalCheck\",\"departmentCode\":\"100002\",\"gatewayName\":\"gateWay0\"}', '1', '1', '${table["jPname"]}Service', 'com.ydcloud.${table["packageName"]}.service.${table["jName"]}Service', 'checkReject', 'completeExecuteMethod');
        INSERT INTO `act_config_actinst` (`company_id`, `prodef_object_id`, `act_id`, `act_name`, `act_type`, `create_time`, `creator`, `update_time`, `modifier`, `assignee`, `candidate_users`, `candidate_groups`, `defined_user`, `form_key`, `documentation`, `gateway_id`, `order_no`, `classId`, `className`, `next_execute_method`, `complete_execute_method`)
        	VALUES ('2', (SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1)), '${table["sPname"]}_approval_check1', '营销副总', 'userTask', sysdate(), null, sysdate(), null, '1520999752816871', null, null, 'assignee', '${table["jPname"]}ApprovalCheck1', '{\"businessType\":\"${table["jPname"]}ApprovalCheck1\",\"departmentCode\":\"100003\",\"gatewayName\":\"gateWay1\"}', '2', '2', '${table["jPname"]}Service', 'com.ydcloud.${table["packageName"]}.service.${table["jName"]}Service', 'checkProcess', 'completeExecuteMethod');
        INSERT INTO `act_config_actinst` (`company_id`, `prodef_object_id`, `act_id`, `act_name`, `act_type`, `create_time`, `creator`, `update_time`, `modifier`, `assignee`, `candidate_users`, `candidate_groups`, `defined_user`, `form_key`, `documentation`, `gateway_id`, `order_no`, `classId`, `className`, `next_execute_method`, `complete_execute_method`)
        	VALUES ('2', (SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1)), '${table["sPname"]}_approval_check2', '财务负责人', 'userTask', sysdate(), null, sysdate(), null, '', null, '100004001', 'candidate_groups', '${table["jPname"]}ApprovalCheck2', '{\"businessType\":\"${table["jPname"]}ApprovalCheck2\",\"departmentCode\":\"100003\",\"gatewayName\":\"gateWay2\"}', '3', '3', '${table["jPname"]}Service', 'com.ydcloud.${table["packageName"]}.service.${table["jName"]}Service', 'checkProcess', 'completeExecuteMethod');
        INSERT INTO `act_config_actinst` (`company_id`, `prodef_object_id`, `act_id`, `act_name`, `act_type`, `create_time`, `creator`, `update_time`, `modifier`, `assignee`, `candidate_users`, `candidate_groups`, `defined_user`, `form_key`, `documentation`, `gateway_id`, `order_no`, `classId`, `className`, `next_execute_method`, `complete_execute_method`)
        	VALUES ('2', (SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1)), '${table["sPname"]}_approval_check3', '财务副总', 'userTask', sysdate(), null, sysdate(), null, '1520998808381627', null, null, 'assignee', '${table["jPname"]}ApprovalCheck3', '{\"businessType\":\"${table["jPname"]}ApprovalCheck3\",\"departmentCode\":\"100003\",\"gatewayName\":\"gateWay3\"}', '4', '4', '${table["jPname"]}Service', 'com.ydcloud.${table["packageName"]}.service.${table["jName"]}Service', 'checkProcess', 'completeExecuteMethod');
        INSERT INTO `act_config_actinst` (`company_id`, `prodef_object_id`, `act_id`, `act_name`, `act_type`, `create_time`, `creator`, `update_time`, `modifier`, `assignee`, `candidate_users`, `candidate_groups`, `defined_user`, `form_key`, `documentation`, `gateway_id`, `order_no`, `classId`, `className`, `next_execute_method`, `complete_execute_method`)
        	VALUES ('2', (SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1)), '${table["sPname"]}_approval_check4', '总经理', 'userTask', sysdate(), null, sysdate(), null, '1523111135799867', null, null, 'assignee', '${table["jPname"]}ApprovalCheck4', '{\"businessType\":\"${table["jPname"]}ApprovalCheck4\",\"departmentCode\":\"100003\",\"gatewayName\":\"gateWay4\"}', '5', '5', '${table["jPname"]}Service', 'com.ydcloud.${table["packageName"]}.service.${table["jName"]}Service', 'checkProcess', 'completeExecuteMethod');
     </#if>
    </#list>
	//流程节点参数
	<#list tableList as table> 
	 <#if (table["bpmnIsGenerate"])>
	    -- ${table["jComment"]}
		//节点1提交审批
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '流程定义KEY', 'processProcdefKey', 'String', '1', '0', '100', null, sysdate(), null, sysdate(), null, '1');
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '项目ID', 'projectId', 'Long', '1', '0', '10', null, sysdate(), null, sysdate(), null, '1');
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '对应业务ID', 'id', 'Long', '1', '0', '10', null, sysdate(), null, sysdate(), null, '1');
		
		//节点1驳回编辑
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '任务ID', 'taskId', 'String', '1', '0', '10', null, sysdate(), null, sysdate(), null, '2');
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '审批结果', 'isApprove', 'boolean', '1', '0', '10', null, sysdate(), null, sysdate(), null, '2');
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '审批意见', 'comment', 'String', '0', '0', '100', null, sysdate(), null, sysdate(), null, '2');
			
		//节点2
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval_check1' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '任务ID', 'taskId', 'String', '1', '0', '10', null, sysdate(), null, sysdate(), null, '1');
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval_check1' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '审批结果', 'isApprove', 'boolean', '1', '0', '10', null, sysdate(), null, sysdate(), null, '1');
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval_check1' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '审批意见', 'comment', 'String', '0', '0', '100', null, sysdate(), null, sysdate(), null, '1');
			
		//节点3
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval_check2' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '任务ID', 'taskId', 'String', '1', '0', '10', null, sysdate(), null, sysdate(), null, '1');
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval_check2' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '审批结果', 'isApprove', 'boolean', '1', '0', '10', null, sysdate(), null, sysdate(), null, '1');
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval_check2' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '审批意见', 'comment', 'String', '0', '0', '100', null, sysdate(), null, sysdate(), null, '1');
			
		//节点4
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval_check3' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '任务ID', 'taskId', 'String', '1', '0', '10', null, sysdate(), null, sysdate(), null, '1');
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval_check3' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '审批结果', 'isApprove', 'boolean', '1', '0', '10', null, sysdate(), null, sysdate(), null, '1');
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval_check3' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '审批意见', 'comment', 'String', '0', '0', '100', null, sysdate(), null, sysdate(), null, '1');
			
		//节点5
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval_check4' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '任务ID', 'taskId', 'String', '1', '0', '10', null, sysdate(), null, sysdate(), null, '1');
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval_check4' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '审批结果', 'isApprove', 'boolean', '1', '0', '10', null, sysdate(), null, sysdate(), null, '1');
		INSERT INTO `act_config_actinst_form_param` (`config_actinst_id`, `param_explain`, `param_name`, `param_type`, `is_required`, `param_min_length`, `param_max_length`, `remark`, `create_time`, `creator`, `update_time`, `modifier`, `param_kind`)
			VALUES ( (SELECT id FROM `act_config_actinst` WHERE act_id='${table["sPname"]}_approval_check4' AND prodef_object_id=(SELECT id FROM act_config_prodef_object WHERE procdef_id =(SELECT ID_ FROM `act_re_procdef` WHERE KEY_='${table["sPname"]}_approval_process' ORDER BY VERSION_ DESC LIMIT 1))), '审批意见', 'comment', 'String', '0', '0', '100', null, sysdate(), null, sysdate(), null, '1');
				
		
     </#if>
    </#list>